<?php
use Application\Model\vn3dUtil;
?>
<ol class="breadcrumb">
			<li><a href="<?php echo $this->url('category', array('action'=>'index'));?>">Menu</a></li>
			<li class="active">Nhóm sản phẩm</li>
		</ol>
<div class="panel panel-primary">
	<div class="panel-heading">
		<h3 class="panel-title">Nhóm sản phẩm</h3>
	</div>
	<div class="panel-body">
	<div class="col-md-12">
	<a
						href="/admin/category/add-group-product/<?php echo $parentID;?>"
						class="btn btn-primary btn-xs" role="button">Thêm</a>
						<hr>
	</div>
		<!-- Table -->
		<table class="table">
			<thead>
				<tr>
					<th>#</th>
					<th>Tên</th>
					<th>Mô tả</th>
					<th>Sửa</th>
					<th>Xóa</th>
				</tr>
			</thead>
			<tbody>
            <?php
            foreach ($categories as $key => $category) :
          $urlSeo=vn3dUtil::convertUrlSeo($category->name);
                ?>



                 <tr>
					<td><?php echo $key+1;?></td>
					<td><a
					title="click để xem danh sách sản phẩm"
						href="<?php echo $this->basepath("/admin/product/index/$category->id/$urlSeo")?>"
						><?php echo $category->name;  ?></a></td>
					<td><?php echo $category->desc;  ?></td>
					<td><a
						href="/admin/category/edit-group-product/<?php echo $category->id;?>/<?php echo $category->parent_id;?>"
						class="btn btn-info btn-xs" role="button">Sửa</a></td>
					<td><a
						href="/admin/category/delete-group-product/<?php echo $category->id;?>/<?php echo $category->parent_id;?>"
						class="btn btn-danger btn-xs" role="button">Xóa</a></td>

				</tr>



<?php endforeach; ?>
</tbody>
		</table>
	</div>
</div>